fix: fixed metamask EIP-6963 provider for injected wallet#2521
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 7bf1d42. Configure here.
chaitanyapotti
approved these changes
Jun 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

JIRA
https://consensyssoftware.atlassian.net/browse/EMBED-413?atlOrigin=eyJpIjoiMzMxNWExMTUwMGQwNDJjYmEyYTdjODNiZDIwMTU3NjgiLCJwIjoiaiJ9
Description
MetaMask is shown as installed without extension, and multichain MetaMask disconnect leaves stale SIWW auth cache
Summary
io.metamask.mmc) is not treated as a native injected walletconnect-and-signmodeRoot Cause
@metamask/connect-evmauto-announces an EIP-6963 provider even without the native MetaMask extension. Ourmipddiscovery path picked up that SDK-announced provider and registered it as an injected connector, which made the modal mark MetaMask as installed and does not proceed to mobile connect option (QR).Additionally, MetaMask multichain auth tokens are cached per connector name + address, but disconnect cleanup only cleared the session for the currently active address, leaving stale tokens for the other connected namespace.
Test plan
connect-and-signmode with MetaMask multichain enabled, connect and authorize with an EVM account and a Solana accountNote
Medium Risk
Touches wallet discovery and connect-and-sign session cleanup for MetaMask; wrong filtering could hide real injected wallets or leave auth state inconsistent.
Overview
Fixes MetaMask showing as installed when only the Connect SDK is present, and stale SIWW auth after multichain disconnect.
EIP-6963 / injected discovery: Exports
METAMASK_ERC_6963_PROVIDER_RDNS(io.metamask.mmc) and filters that provider out of MIPD-based injected EVM connector registration innoModal.ts, so the SDK-announced provider is not duplicated as a native injected wallet. MetaMask stays on the dedicatedmetaMaskConnectorpath (extension when present, QR/deeplink when not).Disconnect / auth cache:
MetaMaskConnector.disconnectnow runsclearMultichainWalletSessions(), which clears SIWW sessions for every connected EVM and Solana address (not just the active one), only callsmultichainClient.disconnect()when status isconnected, and logs per-address cleanup failures without blocking disconnect.Reviewed by Cursor Bugbot for commit 384c90e. Bugbot is set up for automated code reviews on this repo. Configure here.